<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<script>
		let arr = ['1','20','-5','3'];
		console.log(arr);
		/*let newArr = arr.map(function (item) {
			return parseInt(item);
		})*/
		let newArr = arr.map(item => parseInt(item));
		console.log(newArr);

		let arr1 = [1,20,-5,3];
		let result1 = arr1.reduce(function (a, b) {
			console.log(a, b);
			return a + b;
		})
		console.log(result1);
		let result2 = arr1.reduce((a, b) => a + b);
		console.log(result2);
		let result3 = arr1.reduce((a, b) => a * b);
		console.log(result3);
		let result4 = arr1.reduce(function (a, b) {
			console.log(a, b);
			return a * b;
		}, 0);
		console.log(result4);
		let result5 = arr1.reduce((a, b) => a * b, 0);
		console.log(result5);

		let age = 12
		let name = "Amy"
		let person1 = {name: name, age: age};
		console.log(person1);
		let person2 = {name, age};
		console.log(person2);
	</script>
</body>
</html>